﻿@model IEnumerable<IRIS.Models.FAQ>

@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla : Spurt og Svarað";
}

<h2>Algengar Spurningar</h2>

<table>
    <tr>
        <th>
            Titill
        </th>
        <th>
            Spurning
        </th>
        <th>
            Aðgerð
        </th>
    </tr>
@if (Model.Count() > 0)
{
    foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <th>
                @Html.DisplayFor(modelItem => item.Question)
            </th>
            <td>
                @Html.ActionLink("Breyta", "Edit", new { id = item.ID, delete = false }) |
                @Html.ActionLink("Eyða", "Edit", new { id = item.ID, delete = true })
            </td>
        </tr>
    }
}
else
{
    <p>Engar Spurningar hafa verið settar inn.</p>
}

</table>
